package com.kaifamiao.demo.d0728;

public class Demo {

    public static void main(String[] args) {
        Sub sub = new Sub();
        Sup sup = new Sup();

        // 继承是 is a 关系， Sub is a Sup
        Sup sup1 = new Sub();

        System.out.println(sup1.a); // 隐藏
        System.out.println(sup1.b); // 隐藏
        sup1.instanceMethod(); // 重写、覆盖
        sup1.staticMethod(); // 隐藏
    }
}
